package cn.buk.microservice.currency_conversion_service;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//@LoadBalancerClient(name="currency-exchange-service")
//@FeignClient(name="currency-exchange-service")
@FeignClient(name="cloud-gateway")
public interface CurrencyExchangeServiceProxy {

//    @GetMapping("/currency-exchange/from/{from}/to/{to}")		//where {from} and {to} are path variable
    @GetMapping("/CURRENCY-EXCHANGE-SERVICE/currency-exchange/from/{from}/to/{to}")		//where {from} and {to} are path variable
    public CurrencyConversionBean retrieveExchangeValue(@PathVariable("from") String from, @PathVariable("to") String to); //from map to USD and to map to INR
}
